package com.wangyb.wework.service;

import com.ruoyi.common.core.page.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import com.wangyb.wework.entity.employee.EmployeeBO;
import com.wangyb.wework.entity.employee.EmployeeQueryBO;
import com.wangyb.wework.entity.employee.WXEmployeeDTO;
import com.wangyb.wework.entity.employee.WwEmployee;
import org.springframework.transaction.annotation.Transactional;

/**
 * 企业通讯录Service接口
 *
 * @Author: wangyb
 * @Date: 2021/6/28 1:46 下午
 */
public interface IWwEmployeeService extends IServicePlus<WwEmployee> {
	void syncWxEmployee(Long corpId);
	void syncDepartment(Long corpId);
	void syncEmployee(Long corpId);

	@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
	void syncEmployeeStatistic(Long corpId);

	void updateEmpDeptIndex(Long corpId, WXEmployeeDTO dto);

    TableDataInfo<EmployeeBO> index(EmployeeQueryBO req);

	WwEmployee getByWxUserid(String wxUserid);
	WwEmployee getByUserId(Long userId);
}
